Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use p1363 encoding for sign() JS API with ECDSA #4829

Merged
merged 6 commits into from
Jan 12, 2023

Conversation

takuro-sato
Copy link
Contributor

@takuro-sato takuro-sato commented Jan 12, 2023

Partially resolve #4816 (ECDSA)

Basically the change does the same thing as node.js does https://github.com/nodejs/node/blob/v19.4.0/src/crypto/crypto_sig.cc#L170

@takuro-sato takuro-sato changed the title [wip] Use p1363 encodeing for sign() JS API with ECDSA Use p1363 encodeing for sign() JS API with ECDSA Jan 12, 2023
@achamayou achamayou changed the title Use p1363 encodeing for sign() JS API with ECDSA Use p1363 encoding for sign() JS API with ECDSA Jan 12, 2023
src/crypto/ecdsa.cpp Outdated Show resolved Hide resolved
@ghost
Copy link

ghost commented Jan 12, 2023

fix_ecdsa@60436 aka 20230112.59 vs main ewma over 20 builds from 59796 to 60428

Click to see table

main

build_id build_number Commit latency factor tpcc_virtual_cft^ tpcc_sgx_cft^ tpcc_sgx_cft_mem ls_virtual_cft^ ls_sgx_cft^ ls_sgx_cft_mem pi_ls_virtual_cft^ pi_ls_sgx_cft^ pi_ls_sgx_cft_mem pi_ls_jwt_virtual_cft^ ls_jwt_virtual_cft^ ls_js_virtual_cft^ pi_ls_jwt_sgx_cft^ pi_ls_jwt_sgx_cft_mem ls_full_js_virtual_cft^ ls_jwt_sgx_cft^ ls_jwt_sgx_cft_mem ls_js_jwt_virtual_cft^ ls_js_sgx_cft^ ls_js_sgx_cft_mem hist_sgx_cft^ ls_full_js_sgx_cft^ ls_full_js_sgx_cft_mem ls_js_jwt_sgx_cft^ ls_js_jwt_sgx_cft_mem RB put (/s)^ CHAMP put (/s)^ RB get (/s)^ CHAMP get (/s)^
59796 20230106.7 0.761166 17319.1 6393.56 8.19242e+07 43805.5 15526.1 1.50774e+07 49223.5 15994 8.2617e+06 13222.1 14194.6 4558.98 5776.3 4.59168e+06 3539.1 5856.54 1.50774e+07 3405.32 1573.51 7.73741e+06 22169.4 1295.62 7.47526e+06 1310.43 6.95098e+06 838036 1.17707e+06 8.15342e+06 3.07106e+07
59857 20230106.21 0.824187 17277.1 5669.72 8.32349e+07 43619.5 15450.5 1.53396e+07 49466.7 15764.6 8.2617e+06 13908.8 12589.5 4670.24 5734.8 4.59168e+06 3547.54 5829.53 1.45532e+07 3478.18 1556.45 7.73741e+06 22136.6 1288.43 7.47526e+06 1286.07 6.95098e+06 834573 1.18175e+06 8.14777e+06 3.08434e+07
59868 20230106.24 0.790629 17180.8 6320.95 8.19242e+07 45688.2 15386.8 1.50774e+07 47530.3 15929.1 8.2617e+06 13969.6 12598.1 4494.25 5683.6 4.32954e+06 3549.42 5817.54 1.50774e+07 3319.78 1574.04 7.73741e+06 24101.1 1284.61 7.21312e+06 1300.25 6.95098e+06 838278 1.18118e+06 8.13463e+06 3.16206e+07
59884 20230106.28 0.795828 17323.4 6286.33 8.24484e+07 43547.6 15226.6 1.50774e+07 49261.4 15824.1 8.2617e+06 13946.8 12335 4496.59 5691.5 4.59168e+06 3644.43 5567.66 1.48153e+07 3497.16 1549.25 7.73741e+06 27214.7 1274.97 7.47526e+06 1294.91 6.95098e+06 833582 1.17879e+06 8.15352e+06 3.14975e+07
59913 20230109.3 0.801341 17030.4 6306.03 8.19242e+07 43745.9 15416.5 1.50774e+07 49415.6 15958.3 8.2617e+06 13103.9 12604.9 4577.92 5774.8 4.59168e+06 3575.21 5792.56 1.48153e+07 3419.69 1576.66 7.73741e+06 22710.6 1284.27 7.21312e+06 1294.81 6.95098e+06 831861 1.17817e+06 8.13638e+06 3.10176e+07
59965 20230109.15 0.780423 17207.7 6324.3 8.21863e+07 45587.6 15694.6 1.50774e+07 48721.1 15977.1 8.2617e+06 13982.3 14053 4691.8 5780.6 4.59168e+06 3651.59 5818.76 1.50774e+07 3447.26 1569.53 7.73741e+06 27856.7 1288.17 7.21312e+06 1309.81 6.95098e+06 835622 1.17871e+06 8.15426e+06 3.07291e+07
60058 20230110.2 0.7761 17177 6398.3 8.24484e+07 45887.3 15764.4 1.53396e+07 47185 15979.8 8.2617e+06 14027.2 12793.6 4427.6 5811.5 4.59168e+06 3553.85 5893.84 1.4291e+07 3323.97 1572.98 7.73741e+06 28237.9 1285.54 7.21312e+06 1307.16 6.95098e+06 840375 1.17776e+06 8.17301e+06 3.09067e+07
60117 20230110.20 0.793709 17246.8 6323.27 8.21863e+07 45684.9 15710.9 1.53396e+07 46985.6 15956.6 8.2617e+06 13606.6 12624.1 4479.73 5785.1 4.59168e+06 3536.62 5869.63 1.48153e+07 3340.99 1567.43 7.73741e+06 24286.8 1286.53 7.73741e+06 1296.55 6.95098e+06 835130 1.17371e+06 8.15566e+06 3.13385e+07
60151 20230111.5 0.791139 17171.3 6343.82 8.19242e+07 43901.4 15433.3 1.53396e+07 46470.5 15951.2 7.99955e+06 13117.5 12389.4 4473.32 5778.4 4.59168e+06 3536.04 5848.36 1.48153e+07 3461.34 1578.22 7.73741e+06 21576.2 1284.88 7.21312e+06 1309.21 6.95098e+06 828282 1.18042e+06 8.1099e+06 3.07678e+07
60167 20230111.8 0.758201 17139.6 6315.59 8.19242e+07 45992.8 15534.9 1.50774e+07 47619.5 15970.3 8.2617e+06 12093.6 12479.7 4485.43 5782 4.59168e+06 3573.63 5884.84 1.48153e+07 3409.95 1570.16 7.73741e+06 24799.6 1297.01 7.21312e+06 1307.84 6.95098e+06 818104 1.18208e+06 8.1379e+06 3.08169e+07
60177 20230111.10 0.795013 17324.5 6290.6 8.24484e+07 41978.5 15389.6 1.50774e+07 47072.4 15945.5 8.2617e+06 13939.1 12862.3 4483.28 5797.9 4.59168e+06 3518.54 5855.83 1.48153e+07 3376.87 1568.94 7.73741e+06 26897.6 1283.82 7.21312e+06 1297.04 6.95098e+06 834886 1.17906e+06 8.15394e+06 3.08541e+07
60205 20230111.20 0.818883 17129 6326.66 8.19242e+07 45777.1 15469 1.50774e+07 48471.7 15952.3 8.2617e+06 13013.7 12523.7 4453.97 5810.4 4.59168e+06 3456.95 5852.79 1.50774e+07 3417.23 1572.8 7.73741e+06 26865.2 1283.82 7.47526e+06 1292.92 6.95098e+06 817547 1.17827e+06 8.15949e+06 3.09095e+07
60242 20230112.2 0.801192 17468.6 6337.48 8.19242e+07 45719.1 15663 1.53396e+07 46008.3 15920.3 8.2617e+06 13174.6 12460.2 4435.54 5776.9 4.59168e+06 3569.08 5908.37 1.4291e+07 3280 1573.91 7.73741e+06 29580.6 1287.26 7.21312e+06 1307.87 6.95098e+06 829821 1.17384e+06 8.15592e+06 3.14491e+07
60249 20230112.5 0.798559 17286.4 6272.12 8.24484e+07 43775.5 15455.2 1.50774e+07 47350.2 15920.9 8.2617e+06 13596 12438.2 4492.29 5746 4.59168e+06 3666.45 5892.81 1.4291e+07 3433.92 1568.37 7.73741e+06 28217.6 1275.12 7.73741e+06 1282.5 6.95098e+06 828594 1.17891e+06 8.15433e+06 3.17598e+07
60335 20230112.27 0.800287 17278.4 6288 8.19242e+07 41626 15148.3 1.50774e+07 47138.7 15452.4 7.99955e+06 13722.7 12886.9 4640.73 5566.7 4.59168e+06 3567.04 5487.84 1.45532e+07 3365.02 1554.06 7.73741e+06 29029.3 1275.24 7.21312e+06 1268.84 6.95098e+06 839759 1.17704e+06 8.17519e+06 3.08852e+07
60348 20230112.31 0.758084 17294.3 6333.29 8.19242e+07 45689.7 15079.8 1.50774e+07 46122.5 15531.9 8.2617e+06 12993.9 12292.1 4666.95 5631.8 4.59168e+06 3647.73 5531.44 1.45532e+07 3326.87 1564.37 7.73741e+06 22092.6 1279.23 7.21312e+06 1288.44 6.95098e+06 829834 1.18351e+06 8.15592e+06 3.05694e+07
60360 20230112.35 0.794389 17029.7 6326.69 8.21863e+07 45790.8 15229.3 1.50774e+07 46391.9 15485.9 8.2617e+06 12622.6 12856.6 4409.56 5631.1 4.59168e+06 3542.11 5514.34 1.45532e+07 3332.41 1563.71 7.73741e+06 24807.5 1279.01 7.21312e+06 1284.43 6.95098e+06 836317 1.17677e+06 8.15024e+06 3.08517e+07
60402 20230112.52 0.819379 17267.1 6295.91 8.19242e+07 41919 15026.2 1.53396e+07 46301.8 15518 8.2617e+06 12741.8 12793 4527.78 5609 4.59168e+06 3664.38 5539.63 1.48153e+07 3405.65 1551.68 7.73741e+06 21605.8 1281.44 7.73741e+06 1287.91 6.95098e+06 833851 1.1742e+06 8.12624e+06 3.0916e+07
60415 20230112.54 0.784824 17178.5 6302.76 8.1662e+07 43938.7 15158.2 1.53396e+07 47069.9 15438.2 8.2617e+06 12956.1 12809 4683.5 5533.6 4.59168e+06 3569.17 5559.46 1.50774e+07 3293.66 1548.34 7.73741e+06 24467.4 1271.57 7.73741e+06 1284.78 6.95098e+06 833416 1.17183e+06 8.13619e+06 3.11355e+07
60428 20230112.57 0.784055 17150.8 6258.55 8.19242e+07 42143 14931.4 1.50774e+07 46165.7 15442.3 8.2617e+06 13319.8 11628.9 4661.5 5567.5 4.59168e+06 3527.45 5499.34 1.4291e+07 3334.21 1563.18 7.73741e+06 24279.8 1280.94 7.21312e+06 1272.11 6.95098e+06 839137 1.18211e+06 8.14965e+06 3.09553e+07

fix_ecdsa

build_id build_number Commit latency factor tpcc_virtual_cft^ ls_virtual_cft^ pi_ls_virtual_cft^ ls_jwt_virtual_cft^ tpcc_sgx_cft^ tpcc_sgx_cft_mem pi_ls_jwt_virtual_cft^ ls_js_virtual_cft^ ls_full_js_virtual_cft^ ls_sgx_cft^ ls_sgx_cft_mem pi_ls_sgx_cft^ pi_ls_sgx_cft_mem ls_js_jwt_virtual_cft^ ls_jwt_sgx_cft^ ls_jwt_sgx_cft_mem pi_ls_jwt_sgx_cft^ pi_ls_jwt_sgx_cft_mem hist_sgx_cft^ ls_js_sgx_cft^ ls_js_sgx_cft_mem ls_full_js_sgx_cft^ ls_full_js_sgx_cft_mem ls_js_jwt_sgx_cft^ ls_js_jwt_sgx_cft_mem RB put (/s)^ CHAMP put (/s)^ RB get (/s)^ CHAMP get (/s)^
60359 20230112.34 0.801513 17372.7 43843.6 45493.4 12830.4 6292.53 8.21863e+07 12572.6 4608.03 3530.18 15254.1 1.50774e+07 15532.1 8.2617e+06 3294.72 5522.39 1.4291e+07 5590.3 4.59168e+06 21668.4 1552.54 7.73741e+06 1280.38 7.21312e+06 1285.32 6.95098e+06 816986 1.1783e+06 8.17245e+06 3.09352e+07
60376 20230112.40 0.779778 17221.7 45575 45650.2 12353.6 6344.41 8.19242e+07 12804.4 4537.95 3574.73 15272 1.50774e+07 15553.6 8.2617e+06 3310.71 5518.43 1.4291e+07 5599.9 4.59168e+06 26455.4 1563.48 7.73741e+06 1284.37 7.21312e+06 1283.47 6.95098e+06 833119 1.17113e+06 8.16926e+06 3.14491e+07
60393 20230112.48 0.793107 17058.8 42284 47504.6 12820.9 6339.88 8.1662e+07 12553.7 4555.44 3615.76 15010.9 1.53396e+07 15509.6 8.2617e+06 3468.21 5540.5 1.48153e+07 5589.3 4.59168e+06 25171.3 1565 7.73741e+06 1278.75 7.21312e+06 1270.06 6.95098e+06 837062 1.18266e+06 8.15455e+06 3.12863e+07
60436 20230112.59 0.793004 17284.5 41835.5 47058.2 12746.5 6351.77 8.19242e+07 12673.3 4557.65 3646.01 14965.3 1.53396e+07 15479.9 8.2617e+06 3385.42 5518.13 1.45532e+07 5501.2 4.32954e+06 22987.7 1567.99 7.73741e+06 1284.69 7.21312e+06 1271.84 6.95098e+06 839399 1.17683e+06 8.14525e+06 3.08095e+07

images

@takuro-sato takuro-sato marked this pull request as ready for review January 12, 2023 16:09
@takuro-sato takuro-sato requested a review from a team January 12, 2023 16:09
@achamayou
Copy link
Member

@takuro-sato please add an entry to the changelog, since this is a user-visible change.

@achamayou achamayou added auto-backport Automatically backport this PR to LTS branch 3.x-todo PRs which should be backported to 3.x labels Jan 12, 2023
@achamayou achamayou enabled auto-merge (squash) January 12, 2023 21:36
@achamayou achamayou merged commit 139121a into microsoft:main Jan 12, 2023
@github-actions
Copy link

💔 All backports failed

Status Branch Result
release/3.x Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

backport --pr 4829

Questions ?

Please refer to the Backport tool documentation and see the Github Action logs for details

@takuro-sato takuro-sato added the backported This PR was successfully backported to LTS branch label Jan 13, 2023
takuro-sato added a commit to takuro-sato/CCF that referenced this pull request Jan 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.x-todo PRs which should be backported to 3.x auto-backport Automatically backport this PR to LTS branch backported This PR was successfully backported to LTS branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix encoding of sign() JS API function
2 participants